<!DOCTYPE html>
<html ng-app="app" lang="en">
    <head>
        <meta charset="UTF-8">
        <title ng-bind="title"></title>
        <link rel="stylesheet" href="../../style/css/bootstrap.css">
        <link rel="stylesheet" href="../../style/css/matrix-style.css">
        <link rel="stylesheet" href="win.css">
        <script src="../../../node_modules/angular/angular.js"></script>
        <script src="../../a.ui.js"></script>
        <script src="win.js"></script>
        <script>
            // bootstrap app
            var app = angular.module('app', ['a.ui']);
            app.run(function ($rootScope, $win) {
                $rootScope.title = 'Window';
                $rootScope.open = function () {
                    $win.open({
                        title   : '添加用户',
                        template: 'templateId'
                    });
                };
            })
        </script>
    </head>
    <body>
        <div class="container">
            <h1 class="text-center" ng-bind="title"></h1>
            <h5>使用详情参见 <a href="https://github.com/likeastore/ngDialog#api" target="_blank">ngDialog</a>
                <button class="btn btn-default btn-sm" ng-click="open()">打开Window</button>
            </h5>
        <pre>
        $win.open({
            title   : '添加用户',
            template: 'templateId'
        });
        </pre>
        </div>
        <script type="text/ng-template" id="templateId">
            <h1>Template heading</h1>
            <p>Content goes here</p>
        </script>
    </body>
</html>